
package webservice;

import javax.servlet.http.HttpServletRequest;

import webservice.constants.SoapNameConstants;
import webservice.constants.URLConstants;
import webservice.parameter.LocationParameter;
import webservice.soap.LocationSoap;

import com.e885.exception.E885WebserviceException;
import com.e885.log.E885Logger;
import com.e885.webservice.AbstractParameter;
import com.e885.webservice.CommonWebService;

/**
 * <br>
 * Copyright: Copyright (c) 2008-2008<br>
 * Company: ��¤��T
 * 
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 */

public class LocationWebService extends CommonWebService
{
	public LocationWebService()
	{
		super();
	}

	public LocationWebService( HttpServletRequest request )
	{
		super( request, SoapNameConstants.LOCATION_SOAP, LocationSoap.class, URLConstants.LOCATION_URL );
	}

	public LocationWebService( String url )
	{
		super( url, SoapNameConstants.LOCATION_SOAP, LocationSoap.class );
	}

	@Override
	protected void doWebServiceAction( AbstractParameter parameter, Object soap ) throws E885WebserviceException
	{
		try
		{
			( ( LocationSoap )soap ).getLocation( ( ( LocationParameter )parameter ).getAddress() );
		}
		catch( Exception e )
		{
			throw new E885WebserviceException( e.getCause() );
		}
	}
}
